package win.bigwhale.library.model;

import javafx.beans.property.IntegerProperty;
import javafx.beans.property.SimpleIntegerProperty;
import javafx.beans.property.SimpleStringProperty;
import javafx.beans.property.StringProperty;

public abstract class Person {
	private StringProperty nickName;

	public String getNickName() {
		return nickName.get();
	}

	public void setNickName(String nickName) {
		this.nickName.setValue(nickName);
	}

	public StringProperty nickNameProperty() {
		if (nickName == null) {
			nickName = new SimpleStringProperty(this, "nickName");
		}
		return nickName;
	}

	private StringProperty firstName;

	public String getFirstName() {
		return firstName.get();
	}

	public void setFirstName(String firstName) {
		this.firstName.set(firstName);;
	}

	public StringProperty firstNameProperty() {
		if (firstName == null) {
			firstName = new SimpleStringProperty(this, "firstName");
		}
		return firstName;
	}

	private StringProperty familyName;

	public String getFamilyName() {
		return familyName.get();
	}

	public void setFamilyName(String familyName) {
		this.familyName.set(familyName);;
	}

	public StringProperty familyNameProperty() {
		if (familyName == null) {
			familyName = new SimpleStringProperty(this, "familyName");
		}
		return familyName;
	}

	private IntegerProperty age;

	public int getAge() {
		return age.get();
	}

	public void setAge(int age) {
		this.age.set(age);;
	}

	public IntegerProperty ageProperty() {
		if (age == null) {
			age = new SimpleIntegerProperty(this, "age");
		}
		return age;
	}

	private StringProperty gender;

	public String getGender() {
		return gender.get();
	}

	public void setGender(String gender) {
		this.gender.set(gender);;
	}

	public StringProperty genderProperty() {
		if (gender == null) {
			gender = new SimpleStringProperty(this, "gender");
		}
		return gender;
	}
	private StringProperty userId;
	public String getUserId() {
		return userId.get();
	}
	public void setUserId(String userId) {
		this.userId.set(userId);
	}
	public StringProperty userIdProperty() {
		if (userId == null) {
			userId = new SimpleStringProperty(this, "userId");
		}
		return userId;
	}
}
